package com.shop.admin.service.impl;

import com.shop.Result.LdbzResult;
import com.shop.admin.service.AdminSheetService;
import com.shop.api.feign.SheetService;
import com.shop.pojo.LdbzSheet;
import com.shop.pojo.LdbzSheetAssign;
import io.seata.spring.annotation.GlobalTransactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

@GlobalTransactional
public class AdminSheetServiceImpl implements AdminSheetService {

    private static final Logger logger = LoggerFactory.getLogger(AdminSheetServiceImpl.class);

    @Autowired
    private SheetService sheetService;
    @Override
    public LdbzResult countSheet() {
        return sheetService.countSheet(null);
    }

    @Override
    public LdbzResult selectByKey(long id) {
        return sheetService.selectByKey(id);
    }

    @Override
    public LdbzResult getSheetList(LdbzSheet entity) {
        return sheetService.getSheetList(entity);
    }

    @Override
    public LdbzResult getSheetPage(LdbzSheet entity, int page, int limit) {
        return sheetService.getSheetPage(entity, page, limit);
    }

    @Override
    public LdbzResult updateByKey(LdbzSheet entity) {
        return sheetService.updateByKey(entity);
    }

    @Override
    public LdbzResult getSheetAssign(long sheetId) {
        return sheetService.getSheetAssignList(sheetId);
    }

    @Override
    public LdbzResult deleteAssign(String id) {
        return sheetService.deleteAssign(id);
    }

    @Override
    public LdbzResult addAssign(LdbzSheetAssign entity) {
        return sheetService.addAssign(entity);
    }
}
